import {lazy} from "react" // lazy 是用于路由懒加载的
const routercofig = [
    {
        path:"/my",
        element:lazy(()=>import("../pages/My"))
    },
    {
        path:"/detail/:id",
        element:lazy(()=>import("../pages/Deatil"))
    },
    {
        path:"/login",
        element:lazy(()=>import("../pages/Login"))
    },
    {
        path:"/home",
        element:lazy(()=>import("../pages/Home")),
        children:[
            {
                path:"/home/movie",
                element:lazy(()=>import("../pages/Movie"))
            },
            {
                path:"/home/cinema",
                element:lazy(()=>import("../pages/Cinema"))
            }
        ]
    },
    {
        from:"/",
        to:"/home/movie"
    }
]
export default routercofig